Communication apparatus for controlling a display menu dependent upon a write inhibit state of a recording medium

ABSTRACT

A communication apparatus includes a communication unit configured to communicate with a control apparatus, which has a recording unit and executes processing in accordance with a command written to the recording unit, an accepting unit configured to accept selection of a command by a user, and a writing unit configured to write the selected command to the recording unit, and the communication apparatus comprises: a sensing unit configured to sense connection to the control apparatus via the communication unit; a determination unit configured to determine whether the recording unit has been set to a write inhibit state if the connection has been sensed by the sensing unit; and a notification unit configured to notify the user of the fact that the recording unit has been set to the write inhibit state, if the determination unit determines that the recording unit has been set to the write inhibit state.

This application is a divisional of application Ser. No. 12/943,133,filed Nov. 10, 2010 the entire disclosure of which is herebyincorporated by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a communication apparatus and to amethod of controlling the communication apparatus.

2. Description of the Related Art

A technique known in the art makes it possible for a client PC (personalcomputer) that does not support a printing protocol such as LPR (LinePrinter Remote) to execute printing via a printer server (see thespecification of Japanese Patent Laid-Open No. 6-187113). In accordancewith Japanese Patent Laid-Open No. 6-187113, a printer server controls aprinter so as to perform printing based upon print data that a clientpersonal computer has written to a file stored in a recording unit ofthe printer server. As a result, if the client personal computersupports a file sharing protocol such as NFS (Network File System), thenthe client personal computer is capable of executing printing throughthe intermediary of the printer server even if the computer does supportthe printing protocol.

According to a further technique known in the art, a communicationapparatus such as a personal computer writes a command to a file storedin a recording unit of a control apparatus such as a printer server, andthe control apparatus executes processing in accordance with the writtencommand. If this technique is used and the communication apparatussupports a file sharing protocol, then the communication apparatus cancause the control apparatus to execute processing in accordance with thecommand even if the communication apparatus does not support the controlprotocol of the control apparatus. For example, a client personalcomputer that does not support the above-mentioned printing protocol iscapable of causing a printer server to execute printing based upon printdata and, in addition, is capable of causing the printer server toacquire the operating status of the printer and to perform detailedprint settings and the like.

In a case where the recording unit of the above-described controlapparatus has been set to write inhibit, the communication apparatuscannot deliver a command to the control apparatus via a file that hasbeen stored in the recording unit. As a consequence, there is apossibility that the user of the communication apparatus will operatethe communication apparatus in an attempt to cause the control apparatusto execute processing in accordance with a command of some kind withoutthe user being aware of the fact that the recording unit of the controlapparatus has been set to write inhibit. A write error will occur insuch case. To the user, however, who has operated the communicationapparatus for the purpose of causing the control apparatus to executeprocessing, writing to the recording unit is not the immediate purpose.Consequently, there is the possibility that the user will not be able tocomprehend the cause of the write error and, as a result, will not beable to understand why processing by the control apparatus is notexecuted normally. Further, even in a case where the user can comprehendthe cause of the write error, the user will realize the fact that thecontrol apparatus does not accept a command only after the user actuallyoperates the communication apparatus in an attempt to cause the controlapparatus to execute processing in accordance with some sort of command.It is likely that a situation of this kind will detract from the userfriendliness of the communication apparatus.

SUMMARY OF THE INVENTION

The present invention has been devised in view of the foregoingcircumstances and provides a technique for enhancing the userfriendliness of a communication apparatus that is configured to write acommand, which is used by a control apparatus, to a recording unit ofthe control apparatus.

According to an aspect of the present invention, there is provided acommunication apparatus including a communication unit configured tocommunicate with a control apparatus, which has a recording unit andexecutes processing in accordance with a command that has been writtento the recording unit, an accepting unit configured to accept selectionof a command by a user, and a writing unit configured to write theselected command to the recording unit, the communication apparatuscomprising: a sensing unit configured to sense connection to the controlapparatus via the communication unit; a determination unit configured todetermine whether the recording unit has been set to a write inhibitstate if the connection has been sensed by the sensing unit; and anotification unit configured to notify the user of the fact that therecording unit has been set to the write inhibit state, if thedetermination unit determines that the recording unit has been set tothe write inhibit state.

According to another aspect of the present invention, there is provideda method of controlling a communication apparatus including acommunication unit configured to communicate with a control apparatus,which has a recording unit and executes processing in accordance with acommand that has been written to the recording unit, an accepting unitconfigured to accept selection of a command by a user, and a writingunit configured to write the selected command to the recording unit, themethod comprising: a sensing step of sensing connection to the controlapparatus via the communication unit; a determination step ofdetermining whether the recording unit has been set to a write inhibitstate if the connection has been sensed; and a notification step ofnotifying the user of the fact that the recording unit has been set tothe write inhibit state, if it is determined that the recording unit hasbeen set to the write inhibit state.

By virtue of the arrangement described above, the present inventionmakes it possible to enhance the user friendliness of a communicationapparatus that is configured to write a command, which is used by acontrol apparatus, to a recording unit of the control apparatus.

Further features of the present invention will become apparent from thefollowing description of exemplary embodiments (with reference to theattached drawings).

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram illustrating the configurations of a mobilepersonal computer 100 and printer server 200 according to first, secondand fourth embodiments of the present invention;

FIG. 2A is a program stack in a CPU 110 of the mobile personal computer100;

FIG. 2B is a diagram illustrating the file format of a control file,which has been stored in a recording unit 270, for controlling theprinter server 200;

FIG. 3A is a flowchart illustrating processing according to which theCPU 110 of the mobile personal computer 100 controls the printer server200 via the control file that has been stored in the recording unit 270;

FIG. 3B is a flowchart illustrating the flow through which a CPU 210 ofthe printer server 200 executes processing in accordance with a commandthat has been written to a file stored in the recording unit 270;

FIG. 4 is a flowchart illustrating processing executed by the mobilepersonal computer 100 when the printer server 200 is connected in thefirst embodiment;

FIG. 5A is a diagram illustrating an example of display of a print menuin a case where write inhibit has not been applied;

FIG. 5B is a diagram illustrating an example of display of a submenu;

FIG. 5C is a diagram illustrating an example of display of a print menuin a case where write inhibit has been applied;

FIG. 5D is a diagram illustrating a state in which a print menu is notdisplayed;

FIG. 6 is a diagram illustrating an example of display of a warningmessage in a case where write inhibit has been applied;

FIG. 7 is a diagram illustrating examples of printer icons;

FIG. 8 is a flowchart illustrating processing executed by the mobilepersonal computer 100 when the printer server 200 is connected in thesecond embodiment;

FIG. 9 is a block diagram illustrating the configurations of the mobilepersonal computer 100 and printer server 200 according to a thirdembodiment of the present invention;

FIG. 10 is a flowchart illustrating processing executed by the mobilepersonal computer 100 when the printer server 200 is connected in thethird embodiment; and

FIG. 11 is a flowchart illustrating processing executed by the mobilepersonal computer 100 when the printer server 200 is connected in thefourth embodiment.

DESCRIPTION OF THE EMBODIMENTS

Embodiments of the present invention will be described with reference tothe accompanying drawings. In each of the embodiments described below, amobile personal computer is used as an example of a communicationapparatus according to the present invention. Further, it will beassumed that the mobile personal computer communicates with a printerserver, which is one example of a control apparatus. However, examplesof the communication apparatus and control apparatus are not limited tothese. For example, a digital camera or the like can be used as thecommunication apparatus, and a file server or the like can be used asthe control apparatus. It should be noted that it is possible for theembodiments below to be combined in suitable fashion.

First Embodiment

FIG. 1 is a block diagram illustrating the configurations of a mobilepersonal computer 100 and printer server 200 according to a firstembodiment of the present invention. The mobile personal computer 100and printer server 200 have communication units 160 and 260,respectively, and are capable of being connected via a communicationline 500. Although the communication scheme used by the communicationunits 160 and 260 may be any scheme, the block diagram used in thisembodiment is premised on a wired communication scheme.

In the mobile personal computer 100, the CPU 110 includes a processorcore and peripheral circuits such as a general-purpose I/O port and anAD converter and is capable of executing a program. A RAM 140 serving asa primary storage device and a ROM 150 serving as a secondary storagedevice in which a program has been stored are connected to the CPU 110.A recording unit 170 is used as a recording medium for storing imagefiles and document files. A display unit 120 is used to display systeminformation as well as information of various files that have beenstored in the recording unit 170. A operation unit 130 is used by theuser to operate the mobile personal computer 100.

In the printer server 200, the CPU 210 includes a processor core andperipheral circuits such as a general-purpose I/O port and an ADconverter and is capable of executing a program. A RAM 240 serving as aprimary storage device and a ROM 250 serving as a secondary storagedevice in which a program has been stored are connected to the CPU 210.A recording unit 270 is a recording medium for storing a file (controlfile) in which a command for controlling the printer server 200 has beenwritten. A operation unit 230 is used by the user to operate the printerserver 200. A printer port 280 includes an interface for connecting aprinter 300. Therefore, control of the printer 300 from the CPU 210 ispossible.

It should be noted that a file need not necessarily be used when acommand is written. For example, the mobile personal computer 100 maywrite a command to a specific address of the recording unit 270 and theprinter server 200 may execute processing in accordance with the commandthat has been written to this specific address.

The CPU. 210 is capable of allowing a client the mobile personalcomputer 100, for example) to share the recording unit 270 by using filesharing protocol such as NFS. As for the setting of the access attributefor sharing, it is possible to set a “write-enable attribute”, a“read-only attribute” and the like. In this specification, setting a“read-only attribute” is also referred to as setting “write inhibit”.The setting of write inhibit may be implemented by software or byhardware such as a write-protect switch. If the recording unit 270 isset to write inhibit, a file cannot be written to the recording unit 270and a file cannot be updated by, for example, writing a command to thefile that has been stored in the recording unit 270. By way of example,the user can set the recording unit 270 to write inhibit by operatingthe operation unit 230 for the purpose of maintenance work such asreplacement of ink or replenishment of paper in the printer 300connected to the printer server 200.

FIG. 2A is a diagram of program stack which, by being read in andexecuted by the CPU 110 of mobile personal computer 100, causes the CPU110 to function as various means. Starting from the lowermost layer, thestack includes an external device connection module, a deviceidentification information acquisition module, an external recordingunit mounting module, a file access module and an external devicecontrol module in the order mentioned.

The external device connection module is a module for sending andreceiving data to and from a device, which is connected to thecommunication line 500, through the communication unit 160, and fordetecting whether an external device has been connected. The deviceidentification information acquisition module is a module which, if theconnection of an external device has been detected by the externaldevice connection module, is for acquiring the device identificationinformation of the external device, such as the physical address ordevice name information capable of being acquired by the initialcommunication with the external device. By referring to a previouslystored registration list, the device identification informationacquisition module acquires the functions of the external devicecorresponding to the acquired device identification information. Theregistration list may be stored in the mobile personal computer 100 ormay be stored in another external device and acquired from this otherexternal device as necessary. The external recording unit mountingmodule is a module for mounting the recording unit of an external devicein the mobile personal computer 100 by using a file sharing protocol.The access attributes of the recording unit of the external device canalso be acquired by the external recording unit mounting module. Thefile access module is a module for accessing a file, which has beenstored in the recording unit of the external device, through theexternal recording unit mounting module. The external device controlmodule is a module for controlling an external device by writing andreading data to and from a file, which has been stored in the recordingunit of the external device, via the file access module. The externaldevice control module causes the external device to execute processingby, for example, setting the functions of the external device, acquiringvarious information from the external device or accepting and deliveringcommands from and to the external device.

FIG. 2B is a diagram illustrating the file format of a control file,which has been stored in the recording unit 270, for controlling theprinter server 200. A flag area 301 exists at the beginning of the file.A command flag indicating that this is a command from the CPU 110 or aresponse flag indicating that this is a response from the CPU 210 iswritten to the flag area 301. A command from the CPU 110 or a result ofprocessing from the CPU 210 is written to a data area 302. It should benoted that a file need not necessarily be used when a command iswritten, as mentioned above. For example, a prescribed address of therecording unit 270 may be allocated as the flag area 301 and thatanother prescribed address may be allocated as the data area 302.

FIG. 3A is a flowchart illustrating processing according to which theCPU 110 of the mobile personal computer 100 controls the printer server200 via the control file that has been stored in the recording unit 270.At step S301, the CPU 110 accepts selection of a command by the user.The command selected instructs start of printing, end of printing,notification of amount of remaining ink and the like. Processingproceeds to step S302 when a command is selected. At step S302, the CPU110 writes the command flag and the selected command to the control filethat has been stored in the recording unit 270 of printer server 200. Ifa control file does not exist in the recording unit 270, then the CPU110 may generate a command file in which the command flag and selectedcommand have been written and may write the generated command file tothe recording unit 270 at step S302.

Reference will be made to FIG. 3B. FIG. 3B is a flowchart illustratingthe flow through which the CPU 210 of printer server 200 executesprocessing in accordance with a command that has been written to a filestored in the recording unit 270. At step S311, the CPU 210 reads outthe control file. At step S312, the CPU 210 determines whether a commandflag has been set in the control file. If a command flag has not beenset, control returns to step S311 and the CPU 210 reads out the controlfile again, this being performed at prescribed intervals. If a commandhas been set, processing proceeds to step S313. At step S313, the CPU210 executes processing in accordance with the command that has beenwritten to the control file. At step S314, the CPU 210 writes data,which indicates the result of processing at step S313, to the controlfile and sets the response flag in the control file.

With reference again to FIG. 3A, the CPU 110 reads the control file outof the recording unit 270 of printer server 200 at step S303. At stepS304, the CPU 110 determines whether a response flag has been set in thecontrol file. If a response flag has not been set, control returns tostep S303 and the CPU 110 reads out the control file again, this beingperformed at prescribed intervals. If a command has been set, processingproceeds to step S305. At step S305, the CPU 110 acquires the result ofprocessing from the control file. The processing result acquired is thatwhich was written by the CPU 210 of printer server 200 at step S314.

Control of the printer server 200 through the intermediary of a controlfile is achieved by the processing described above. However, in a casewhere the recording unit 270 of printer server 200 has been set to“write inhibit”, the CPU 110 cannot write a command flag and command tothe control file at step S302. At step S312, therefore, detection of thecommand flag does not occur and control of the printer server 200becomes impossible. Accordingly, in this embodiment, the mobile personalcomputer 100 notifies the user of the fact that the recording unit 270has been set to “write inhibit”, as will be described below in detail.

FIG. 4 is a flowchart illustrating processing executed by the mobilepersonal computer 100 when the printer server 200 is connected. At stepS401, the CPU 110 senses whether an external device has been connectedto the communication unit 160. If connection of an external device issensed, processing proceeds to step S402. At step S402, the CPU 110acquires the device identification information of the external device.At step S403, the CPU 110 determines whether the connected externaldevice is the printer server 200. Processing proceeds to step S404 ifthe external device is the printer server 200 or to step S427 if theexternal device is not the printer server 200. It should be noted thatsince the external device is not limited to the printer server 200, theprocessing at step S403 is, in a broad sense, processing for determiningwhether the external device is a control device of the type thatexecutes control according to the method described above with referenceto FIG. 3B. A “YES” decision rendered at both steps S401 and S403 meansthat connection of a control device of the type that executes controlaccording to the method described above with reference to FIG. 3B hasbeen sensed.

At step S404, the CPU 110 mounts the recording unit 270 of printerserver 200 as network drive. At step S405, the CPU 110 checks the accessattribute of the mounted drive. At step S406, the CPU 110 determineswhether the recording unit 270 has been set to “write inhibit”.Processing proceeds to step S416 in case of write inhibit or to stepS407 otherwise. At step S407, the CPU 110 displays a print menu 501shown in FIG. 5A and makes it possible to operate the print menu 501. Ifthe user selects the print menu 501 via the operation unit 130, the CPU110 displays a submenu shown in FIG. 5B. In the submenu, the user iscapable of selecting printer select 502, detailed setting 503, printstop 504 and print inhibit 505 and the like. Each item corresponds to acommand of the printer server 200. Selecting an item corresponds toselecting a command, and the CPU 110 accepts the selection. Further, asfar as the user is concerned, the print menu 501 and submenu are alsoitems of information indicating that the printer server 200 has beenconnected.

If write inhibit has been determined at step S406, then the CPU 110displays the window of a warning message, shown in FIG. 6, at step S416.In this way the user is capable of recognizing that the printer server200 cannot be controlled because the recording unit 270 has been set towrite inhibit. Although there are cases where this window includes aprint stop button 601, this will be described in another embodiment. Thenotification given at step S416 may just as well be implemented by abeep tone, for example, rather than by a display. The warning messagemay be displayed continuously during the time that the printer server200 is connected or may be extinguished upon elapse of a prescribedperiod of time. At this time the mobile personal computer 100 is notcapable of executing control of the printer server 200 via a controlfile but is capable of performing other communication with the printerserver 200. It is therefore unnecessary to terminate communication withthe printer server 200.

At step S417, the CPU 110 displays a print menu 506 in a gray color, asshown in FIG. 5C, and disables operation of the print menu 506. As faras the user is concerned, the print menu 506 and submenu are also itemsof information indicating that the printer server 200 has beenconnected. However, since the print menu 506 has an appearance differentfrom that of the print menu 501, the user can recognize that the printerserver 200 is not controllable.

If the printer server 200 has not been connected, in step S427, the CPU110 does not allow display of the print menu (see FIG. 5D).

It should be noted that the user can be notified of various states ofthe printer 300 by changing the printer icon shown in FIGS. 5A and 5C.FIG. 7 is a diagram illustrating examples of printer icons. In a casewhere the printer server 200 is capable of being controlled normally,the CPU 110 displays icons id0 to id4 in FIG. 7 in accordance with thestatus of the printer server 200. In a case where an error has occurredin the printer 300 connected to the printer server 200, the CPU 110displays an icon id5. In a case where the printer server 200 isincapable of being controlled, the CPU 110 displays an icon id6, therebynotifying the user of the fact that the printer server 200 is notcapable of being controlled.

In accordance with this embodiment, as described above, when the printerserver 200 is connected, the mobile personal computer 100 determineswhether the recording unit 270 of printer server 200 has been set towrite inhibit. If the recording unit 270 has been set to write inhibit,the mobile personal computer 100 so notifies the user. Accordingly,before the user selects a command for the printer server 200, the useris capable of recognizing that the recording unit 270 has been set towrite inhibit. As a result, there is diminished possibility that theuser will select a command despite the fact that writing of the commandis not possible. This improves user friendliness of the printer server200. Further, in a case where the mobile personal computer 100 disablesoperation of the print menu (that is, a case where the mobile personalcomputer 100 exercises control in such a manner that selection of acommand is not accepted), a further improvement in user friendliness ofthe printer server 200 is obtained.

Second Embodiment

The first embodiment is such that even in a case where the recordingunit 270 has been set to write inhibit, the mobile personal computer 100displays the print menu (although the external appearance of which isdifferent). On the other hand, the second embodiment is such that in acase where the recording unit 270 has been set to write inhibit, themobile personal computer 100 does not display the print menu. In thisway the user can be prevented from selecting a command irrespective ofthe fact that writing, of a command is impossible. This improves theuser friendliness of the printer server 200. This will be described withreference to FIG. 8.

The second embodiment is similar to the first embodiment except for thefact that the flowchart of FIG. 8 is used instead of the flowchart ofFIG. 4. Further, processing steps in FIG. 8 identical with or similar tothose in FIG. 4 are designated by like step numbers and need not bedescribed again.

At step S801, the CPU 110 determines whether the recording unit 270 hasbeen set to “write inhibit”. Processing proceeds to step S427 in case ofwrite inhibit (this embodiment differs from the first embodiment in thisrespect) or to step S407 otherwise.

By virtue of the above processing, the mobile personal computer 100 doesnot display the print menu in a case where the recording unit 270 hasbeen set to write inhibit. As a result, the user friendliness of theprinter server 200 is enhanced, as described above. Further, sincedisplay of a warning message (see steps S416 and S417 in FIG. 4), etc.,is unnecessary, the implementation of the printer server 200 can besimplified.

Third Embodiment

Consider a case where the recording unit 270 of printer server 200 hasnot been set to “write inhibit” and communication is disconnected owingto failure of the communication line 500 while the mobile personalcomputer 100 is writing print data to a control file in the printerserver 200. Then assume that the recording unit 270 is subsequently setto “write inhibit”. In this case, even when the communication line 500is restored, the mobile personal computer 100 cannot write to thecontrol file. This means that information about a print job suspendedwhile in progress cannot be acquired and that the print job cannot becancelled. Hence there is the possibility that ink or paper will bewasted. Accordingly, in the third embodiment, printing by the printerserver 200 can be forcibly stopped. This will be described below.

FIG. 9 is a block diagram illustrating the configurations of the mobilepersonal computer 100 and printer server 200 according to the thirdembodiment of the present invention. Blocks in FIG. 9 having functionsidentical with or similar to those shown in FIG. 1 are designated bylike reference characters and need not be described again.

In the third embodiment, a power supply control apparatus 400 has beenconnected to the mobile personal computer 100 and printer server 200. Inthe power supply control apparatus 400, a CPU 410 includes a processorcore and peripheral circuits such as a general-purpose I/O port and anAD converter and is capable of executing a program. A RAM 440 serving asa primary storage device and a ROM 450 serving as a secondary storagedevice in which a program has been stored are connected to the CPU 410.A communication unit 460 connects the power supply control apparatus 400to the mobile personal computer 100 and printer server 200 via thecommunication units 160 and 260, respectively. A recording unit 470stores a control file for the power supply control apparatus 400.Accordingly, the power supply control apparatus 400 functions as acontrol apparatus which can be controlled using a file sharing protocolin a manner similar to that of the printer server 200. A power supplycontroller 490 controls a power supply controller 290 in the printerserver 200, thereby turning the power supply of the printer server 200on and off.

FIG. 10 is a flowchart illustrating processing executed by the mobilepersonal computer 100 when the printer server 200 is connected.Processing steps in FIG. 10 identical with or similar to those in FIG. 4are designated by like step numbers and need not be described again. TheCPU 110 displays the window of the warning message, shown in FIG. 6, atstep S1001. This window has the print stop button 601, as shown in FIG.6. At step S1002, the CPU 110 determines whether the print stop button601 has been pressed. Processing proceeds to step S1003 if the printstop button 601 is pressed.

At step S1003, the CPU 110 writes a command flag and a command, whichinstructs that the power supply of the printer server 200 is to beturned off, to a control file that has been stored in the recording unit470 of power supply control apparatus 400. As a result, the power supplycontrol apparatus 400 turns off the power supply of the printer server200 via the power supply controller 490 and power supply controller 290.Accordingly, printing currently being executed by the printer server 200is forcibly stopped and wasting of ink and paper can be avoided.

It should be noted that the method whereby the mobile personal computer100 instructs the power supply control apparatus 400 is not limited touse of a control file. In this embodiment, it will suffice if the CPU110 instructs the power supply control apparatus 400 so as to turn offthe power supply of the printer server 200 regardless of the methodused.

Fourth Embodiment

In the third embodiment, the power supply control apparatus 400 isnecessary in order to stop printing. In addition, it is necessary toturn off the power supply of the printer server 200. By contrast, thefourth embodiment dispenses with the power supply control apparatus 400and makes it unnecessary to turn off the power supply of the printerserver 200. This will now be described. The fourth embodiment is similarto the first embodiment except for the fact that the flowchart of FIG.11 is used instead of the flowchart of FIG. 4. Further, processing stepsin FIG. 11 identical with or similar to those in FIG. 4 or FIG. 10 aredesignated by like step numbers and need not be described again.

FIG. 11 is a flowchart illustrating processing executed by the mobilepersonal computer 100 when the printer server 200 is connected in thefourth embodiment. At step S1101, the CPU 110 accesses the recordingunit 270 of printer server 200 in an administrator mode and sets therecording unit 270 to “write enable”. At step S1102, the CPU 110 writesa command flag and a command, which instructs print stop, to a controlfile that has been stored in the recording unit 270. As a result, theprinter server 200 stops printing currently in progress and preventswasting of ink and paper. At step S1103, the CPU 110 accesses therecording unit 270 of printer server 200 in the administrator mode andsets the recording unit 270 to “write inhibit”.

Other Embodiments

Aspects of the present invention can also be realized by a computer of asystem or apparatus (or devices such as a CPU or MPU) that reads out andexecutes a program recorded on a memory device to perform the functionsof the above-described embodiment(s), and by a method, the steps ofwhich are performed by a computer of a system or apparatus by, forexample, reading out and executing a program recorded on a memory deviceto perform the functions of the above-described embodiment(s). For thispurpose, the program is provided to the computer for example via anetwork or from a recording medium of various types serving as thememory device (e.g., computer-readable medium).

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all such modifications and equivalent structures andfunctions.

This application claims the benefit of Japanese Patent Application No,2009-288420, filed on Dec. 18, 2009, which is hereby incorporated byreference herein in its entirety.

What is claimed is:
 1. A control apparatus capable of being connected toa predetermined recording apparatus, which has a recording mediumconfigured to record a control file and executes processing inaccordance with a command that is written to the control file, thecontrol apparatus comprising: a display control unit configured todisplay, on a display unit, a control menu for accepting a controlinstruction to the predetermined recording apparatus by a useroperation; a writing control unit configured to control to write acommand corresponding to the control instruction accepted using thecontrol menu to the control file in the recording medium; and a firstdetermination unit configured to determine whether or not a data-writinginhibit state is set by a hardware switch of the recording apparatusafter detecting connection to the predetermined recording apparatus andrecognizing the predetermined recording apparatus, wherein thedata-writing inhibit state is a state for inhibiting data from beingwritten to the recording medium, wherein if it is determined by thefirst determination unit that the data-writing inhibit state is set, thedisplay control unit controls the display unit so as to make a userrecognize that the user cannot control the predetermined recordingapparatus using the control menu.
 2. The apparatus according to claim 1,wherein if it is determined by the first determination unit that thedata-writing inhibit state is set, the display control unit controls notto display the control menu.
 3. The apparatus according to claim 1,wherein if it is determined by the first determination unit that thedata-writing inhibit state is set, the display control unit controls todisplay the control menu in a manner that a selection on the controlmenu is impossible.
 4. The apparatus according to claim 3, wherein if itis determined by the first determination unit that the data-writinginhibit state is set, the display control unit causes the control menudisplayed on the display unit to be grayed out.
 5. The apparatusaccording to claim 4, further comprising a second determination unitconfigured to determine whether or not an apparatus connected to thecontrol apparatus is the predetermined recording apparatus, wherein ifit is determined by the second determination unit that the apparatusconnected to the control apparatus is not the predetermined recordingapparatus, the display control unit controls not to display the controlmenu regardless of whether or not the data-writing inhibit state is set.6. The apparatus according to claim 1, further comprising a seconddetermination unit configured to determine whether or not an apparatusconnected to the control apparatus is the predetermined recordingapparatus, wherein if it is determined by the second determination unitthat the apparatus connected to the control apparatus is not thepredetermined recording apparatus, the display control unit controls notto display the control menu regardless of whether or not thedata-writing inhibit state is set.
 7. The apparatus according to claim1, wherein the writing control unit controls to read the control file toobtain a result of processing corresponding to the command written tothe control file.
 8. The apparatus according to claim 1, wherein thecommand and a result of processing corresponding to the command arewritten to a single control file.
 9. The apparatus according to claim 1,wherein the control file has a flag area, and when the controlinstruction is accepted using the control menu, the writing control unitcontrols to change a state of a flag in the flag area.
 10. The apparatusaccording to claim 9, wherein the command and the state of the flag arewritten to a single control file.
 11. The apparatus according to claim1, wherein if it is determined by the first determination unit that thedata-writing inhibit state is set, the display control unit displays anotification on the display unit, the notification notifying that thedata-writing inhibit state is set.
 12. The apparatus according to claim1, wherein the control apparatus is a mobile device.
 13. The apparatusaccording to claim 1, wherein the processing is printing processing. 14.The apparatus according to claim 1, wherein the control apparatusconnects to the predetermined recording apparatus via a wiredconnection.
 15. A method of controlling a control apparatus capable ofbeing connected to a predetermined recording apparatus, which has arecording medium configured to record a control file and executesprocessing in accordance with a command that is written to the controlfile, the method comprising: displaying, on a display unit, a controlmenu for accepting a control instruction to the predetermined recordingapparatus by a user operation; controlling to write a commandcorresponding to the control instruction accepted using the control menuto the control file in the recording medium; and determining whether ornot a data-writing inhibit state is set by a hardware switch of therecording apparatus after detecting connection to the predeterminedrecording apparatus and recognizing the predetermined recordingapparatus, wherein the data-writing inhibit state is a state forinhibiting data from being written to the recording medium, wherein ifit is determined that the data-writing inhibit state is set, thedisplaying controls the display unit so as to make a user recognize thatthe user cannot control the predetermined recording apparatus using thecontrol menu.
 16. A non-transitory computer-readable storage medium onwhich has been recorded a program for causing a computer to execute amethod of controlling a control apparatus capable of being connected toa predetermined recording apparatus, which has a recording mediumconfigured to record a control file and executes processing inaccordance with a command that is written to the control file, themethod comprising: displaying, on a display unit, a control menu foraccepting a control instruction to the predetermined recording apparatusby a user operation; controlling to write a command corresponding to thecontrol instruction accepted using the control menu to the control filein the recording medium; and determining whether or not a data-writinginhibit state is set by a hardware switch of the recording apparatusafter detecting connection to the predetermined recording apparatus andrecognizing the predetermined recording apparatus, wherein thedata-writing inhibit state is a state for inhibiting data from beingwritten to the recording medium, wherein if it is determined that thedata-writing inhibit state is set, the displaying controls the displayunit so as to make a user recognize that the user cannot control thepredetermined recording apparatus using the control menu.
 17. A controlapparatus capable of being connected to a predetermined recordingapparatus, which has a recording medium configured to record a controlfile and executes processing in accordance with a command that iswritten to the control file, the control apparatus comprising: adetecting unit configured to detect that the predetermined recordingapparatus is connected to the control apparatus; a display control unitconfigured to display, on a display unit, a control menu for accepting acontrol instruction to the predetermined recording apparatus by a useroperation; a writing control unit configured to control to write acommand corresponding to the control instruction accepted using thecontrol menu to the control file in the recording medium; and a firstdetermination unit configured to determine, in a state in which thepredetermined recording apparatus is connected to the control apparatus,whether or not a data-writing inhibit state is set by a hardware switchof the recording apparatus, wherein the data-writing inhibit state is astate for inhibiting data from being written to the recording medium,wherein if the detecting unit does not detect the connection of thepredetermined recording apparatus, the display control unit controls thedisplay unit so as to make a user, by a first display manner, recognizethat the user cannot control the predetermined recording apparatus usingthe control menu, and wherein if it is determined by the firstdetermination unit that the data-writing inhibit state is set, thedisplay control unit controls the display unit so as to make a user, bya second display manner which is different from the first displaymanner, recognize that the user cannot control the predeterminedrecording apparatus using the control menu.
 18. The apparatus accordingto claim 17, wherein if it is determined by the first determination unitthat the data-writing inhibit state is set, the display control unitcontrols to display the control menu in a manner that a selection on thecontrol menu is impossible.
 19. The apparatus according to claim 18,wherein if it is determined by the first determination unit that thedata-writing inhibit state is set, the display control unit causes thecontrol menu displayed on the display unit to be grayed out.
 20. Theapparatus according to claim 19, further comprising a seconddetermination unit configured to determine whether or not an apparatusconnected to the control apparatus is the predetermined recordingapparatus, wherein if it is determined by the second determination unitthat the apparatus connected to the control apparatus is not thepredetermined recording apparatus, the display control unit controls notto display the control menu regardless of whether or not thedata-writing inhibit state is set.
 21. The apparatus according to claim17, further comprising a second determination unit configured todetermine whether or not an apparatus connected to the control apparatusis the predetermined recording apparatus, wherein if it is determined bythe second determination unit that the apparatus connected to thecontrol apparatus is not the predetermined recording apparatus, thedisplay control unit controls not to display the control menu regardlessof whether or not the data-writing inhibit state is set.
 22. Theapparatus according to claim 17, wherein the writing control unitcontrols to read the control file to obtain a result of processingcorresponding to the command written to the control file.
 23. Theapparatus according to claim 17, wherein the command and a result ofprocessing corresponding to the command are written to a single controlfile.
 24. The apparatus according to claim 17, wherein the control filehas a flag area, and when the control instruction is accepted using thecontrol menu, the writing control unit controls to change a state of aflag in the flag area.
 25. The apparatus according to claim 24, whereinthe command and the state of the flag are written to a single controlfile.
 26. The apparatus according to claim 17, wherein if it isdetermined by the first determination unit that the data-writing inhibitstate is set, the display control unit displays a notification on thedisplay unit, the notification notifying that the data-writing inhibitstate is set.
 27. The apparatus according to claim 17, wherein thecontrol apparatus is a mobile device.
 28. The apparatus according toclaim 17, wherein the processing is printing processing.
 29. Theapparatus according to claim 17, wherein the control apparatus connectsto the predetermined recording apparatus via a wired connection.
 30. Amethod of controlling a control apparatus capable of being connected toa predetermined recording apparatus, which has a recording mediumconfigured to record a control file and executes processing inaccordance with a command that is written to the control file, themethod comprising: detecting that the predetermined recording apparatusis connected to the control apparatus; displaying, on a display unit, acontrol menu for accepting a control instruction to the predeterminedrecording apparatus by a user operation; controlling to write a commandcorresponding to the control instruction accepted using the control menuto the control file in the recording medium; and determining, in a statein which the predetermined recording apparatus is connected to thecontrol apparatus, whether or not a data-writing inhibit state is set bya hardware switch of the recording apparatus, wherein the data-writinginhibit state is a state for inhibiting data from being written to therecording medium, wherein if the detecting does not detect theconnection of the predetermined recording apparatus, the displayingcontrols the display unit so as to make a user, by a first displaymanner, recognize that the user cannot control the predeterminedrecording apparatus using the control menu, and wherein if it isdetermined that the data-writing inhibit state is set, the displayingcontrols the display unit so as to make a user, by a second displaymanner which is different from the first display manner, recognize thatthe user cannot control the predetermined recording apparatus using thecontrol menu.
 31. A non-transitory computer-readable storage medium onwhich has been recorded a program for causing a computer to execute amethod of controlling a control apparatus capable of being connected toa predetermined recording apparatus, which has a recording mediumconfigured to record a control file and executes processing inaccordance with a command that is written to the control file, themethod comprising: detecting that the predetermined recording apparatusis connected to the control apparatus; displaying, on a display unit, acontrol menu for accepting a control instruction to the predeterminedrecording apparatus by a user operation; controlling to write a commandcorresponding to the control instruction accepted using the control menuto the control file in the recording medium; and determining, in a statein which the predetermined recording apparatus is connected to thecontrol apparatus, whether or not a data-writing inhibit state is set bya hardware switch of the recording apparatus, wherein the data-writinginhibit state is a state for inhibiting data from being written to therecording medium, wherein if the detecting does not detect theconnection of the predetermined recording apparatus, the displayingcontrols the display unit so as to make a user, by a first displaymanner, recognize that the user cannot control the predeterminedrecording apparatus using the control menu, and wherein if it isdetermined that the data-writing inhibit state is set, the displayingcontrols the display unit so as to make a user, by a second displaymanner which is different from the first display manner, recognize thatthe user cannot control the predetermined recording apparatus using thecontrol menu.